package com.chucang.shucang.pms.feign;

import com.chucang.shucang.common.base.constant.SecurityConstant;
import com.chucang.shucang.common.base.utils.R;
import com.chucang.shucang.pms.feign.vo.PanicPurchaseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/10/4 14:13
 * @description
 */
@FeignClient(contextId = "pms-sms", value = "shucang-sms")
public interface SmsService {

    @PostMapping("/sms/panicpurchase/addNewPanicPurchase")
    R<String> addNewPanicPurchase(@Valid @RequestBody PanicPurchaseVO panicPurchaseVO, @RequestHeader(SecurityConstant.FROM) String from);

    @GetMapping("/sms/panicpurchase/offPanicPurchase/{id}")
    R<String> offPanicPurchase(@PathVariable("id") Long id, @RequestHeader(SecurityConstant.FROM) String from);

}
